<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->resource('auth/users', 'UserController')->names('admin.auth.users');

    $router->get('/', 'HomeController@index')->name('admin.home');
//    $router->resource('bicycle', 'BicycleController')->names('admin.bicycle');
    Route::group([
        'prefix'        => 'stock',
        'namespace'     => '\\App\\Admin\\Controllers\\Stock\\'
    ], function (Router $router){
        $router->resource('stock_depot', 'StockDepotController')->names('admin.stock.stock_depot');
        $router->resource('stock_product', 'StockProductController')->names('admin.stock.stock_product');
        $router->resource('stock_unit', 'StockUnitController')->names('admin.stock.stock_unit');
        $router->resource('stock_apply', 'StockApplyController')->names('admin.stock.stock_apply');

        $router->get('stock_report/export', 'StockReportController@export')->name('admin.stock.stock_report.export');
        $router->resource('stock_report', 'StockReportController')->names('admin.stock.stock_report');
    });

});
